home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / ODF Release 3 / ODFDev / Hello / Sources / Part.r < prev    next >
Encoding:
Text File  |  1996-12-16  |  5.4 KB  |  256 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                Part.r
  4. //    Release Version:    $ ODF 3 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #define SystemSevenOrBetter 1            // we want the extended types
  11. #define    SystemSevenOrLater    1            // Types.r uses this variable
  12.  
  13. #include "Types.r"
  14. #include "SysTypes.r"
  15. #include "CodeFragmentTypes.r"
  16.  
  17. #ifndef __ODTYPES_R__
  18. #include "ODTypes.r"
  19. #endif
  20.  
  21. #ifndef FWBLDDEF_H
  22. #include "FWBldDef.h"
  23. #endif
  24.  
  25. #ifndef DEFINES_K
  26. #include "Defines.k"
  27. #endif
  28.  
  29. #ifndef BINDING_K
  30. #include "Binding.k"
  31. #endif
  32.  
  33. //-------------------------------------------------------------------------------------
  34. // Code Fragment Resource
  35. //-------------------------------------------------------------------------------------
  36.  
  37. resource 'cfrg' (0) {
  38.     {    /* array memberArray: 2 elements */
  39.         /* [1] */
  40. #ifdef FW_BUILD_MAC68K
  41.         kMotorola,
  42. #else
  43.         kPowerPC,
  44. #endif
  45.         kFullLib,
  46.         kNoVersionNum,
  47.         kNoVersionNum,
  48.         kDefaultStackSize,
  49.         kNoAppSubFolder,
  50.         kIsLib,
  51.         kOnDiskFlat,
  52.         kZeroOffset,
  53.         kWholeFork,
  54.         kODFHelloEditor,
  55.         /* [2] */
  56. #ifdef FW_BUILD_MAC68K
  57.         kMotorola,
  58. #else
  59.         kPowerPC,
  60. #endif
  61.         kFullLib,
  62.         kNoVersionNum,
  63.         kNoVersionNum,
  64.         kDefaultStackSize,
  65.         kNoAppSubFolder,
  66.         kIsLib,
  67.         kOnDiskFlat,
  68.         kZeroOffset,
  69.         kWholeFork,
  70.         "ODFHello"
  71.     }
  72. };
  73.  
  74. //-------------------------------------------------------------------------------------
  75. // NMAP Resources
  76. //-------------------------------------------------------------------------------------
  77.  
  78. resource kODNameMappings (kKindCategoryMapID) {
  79.     kODKind,
  80.     {
  81.         kODFHelloKind, kODIsAnISOStringList {
  82.             {
  83.                 kODCategoryPlainText
  84.             }
  85.         }
  86.     }
  87. };
  88.  
  89. resource kODNameMappings (kEditorKindMapID) {
  90.     kODEditorKinds,
  91.     {
  92.         kODFHelloEditor, kODIsAnISOStringList {
  93.             {
  94.                 kODFHelloKind
  95.             }
  96.         }
  97.     }
  98. };
  99.  
  100. resource kODNameMappings (kEditorUserStringMapID) {
  101.     kODEditorUserString,
  102.     {
  103.         kODFHelloEditor, kODIsINTLText {
  104.             smRoman, langEnglish, kODFHelloEditorUserString
  105.         }
  106.     }
  107. };
  108.  
  109. resource kODNameMappings (kKindUserStringMapID) {
  110.     kODKindUserString,
  111.     {
  112.         kODFHelloKind, kODIsINTLText {
  113.             smRoman, langEnglish, "ODFHello"
  114.         }
  115.     }
  116. };
  117.  
  118. resource kODNameMappings (kOldMacOSTypeMapID) {
  119.     kODKindOldMacOSType,
  120.     {
  121.         kODFHelloKind, kODIsMacOSType {
  122.             kODFHelloDocumentOSType
  123.         }
  124.     }
  125. };
  126.  
  127. resource kODNameMappings (kEditorPlatformKinds) {
  128.     kODEditorPlatformKind,
  129.     {
  130.         kODFHelloEditor, kODIsPltfmTypeSpac {
  131.             {
  132.                 kODPlatformFileType,  'TEXT',  smRoman,  langEnglish,  "Text File",  kODCategoryPlainText,
  133.                 kODPlatformDataType,  'TEXT',  smRoman,  langEnglish,  "Text Data",  kODCategoryPlainText
  134.             }
  135.         }
  136.     }
  137. };
  138.  
  139. //-------------------------------------------------------------------------------------
  140. // BNDL resources 
  141. //-------------------------------------------------------------------------------------
  142.  
  143. resource 'FREF' (128) {
  144.     'shlb',
  145.     0,
  146.     ""
  147. };
  148.  
  149. resource 'FREF' (132) {
  150.     kODFHelloDocumentOSType,
  151.     1,
  152.     ""
  153. };
  154.  
  155. resource 'FREF' (133) {
  156.     kODFHelloStationeryOSType,
  157.     2,
  158.     ""
  159. };
  160.  
  161. resource 'BNDL' (128) {
  162.     kODFHelloPartEditorOSType,
  163.     0,
  164.     {    /* array TypeArray: 2 elements */
  165.         /* [1] */
  166.         'FREF',
  167.         {    /* array IDArray: 1 elements */
  168.             /* [1] */
  169.             0, 128
  170.         },
  171.         /* [2] */
  172.         'ICN#',
  173.         {    /* array IDArray: 1 elements */
  174.             /* [1] */
  175.             0, 130
  176.         }
  177.     }
  178. };
  179.  
  180. resource 'BNDL' (129) {
  181.     kODShellSignature,
  182.     0,
  183.     {    /* array TypeArray: 2 elements */
  184.         /* [1] */
  185.         'FREF',
  186.         {    /* array IDArray: 2 elements */
  187.             /* [1] */
  188.             1, 132,
  189.             /* [2] */
  190.             2, 133
  191.         },
  192.         /* [2] */
  193.         'ICN#',
  194.         {    /* array IDArray: 2 elements */
  195.             /* [1] */
  196.             1, 128,
  197.             /* [2] */
  198.             2, 129
  199.         }
  200.     }
  201. };
  202.  
  203. data kODShellSignature (0, "Owner resource") {
  204.     $"00"                                                 /* . */
  205. };
  206.  
  207. data kODFHelloPartEditorOSType (0, "Owner resource") {
  208.     $"00"                                                 /* . */
  209. };
  210.  
  211. //-------------------------------------------------------------------------------------
  212. // kind Resources
  213. //-------------------------------------------------------------------------------------
  214.  
  215. // Kind resources affect the text Finder displays in the
  216. // "kind" column and file info dialog. This feature was
  217. // introduced as part of Macintosh Easy Open.
  218. //
  219. resource 'kind' (1000) {
  220.     kODFHelloPartEditorOSType,
  221.     0, /* region = USA */
  222.     {
  223.         'shlb', "OpenDoc™ editor"
  224.     }
  225. };
  226.         
  227. resource 'kind' (1001) {
  228.     kODShellSignature,
  229.     0, /* region = USA */
  230.     {
  231.         kODFHelloDocumentOSType, kODFHelloEditorUserString" document",
  232.         kODFHelloStationeryOSType, kODFHelloEditorUserString" stationery"
  233.     }
  234. };
  235.  
  236. //-------------------------------------------------------------------------------------
  237. // STR resources
  238. //-------------------------------------------------------------------------------------
  239. // The -16397 string will be displayed by Finder when a user
  240. // tries to open the editor shared library. The string should
  241. // give the user a little detail about the part's capabilities
  242. // and enough information to install the part in the correct location.
  243. //
  244. resource 'STR ' (-16397, purgeable) {
  245.     "OpenDoc™ editor\n\nTo work properly, the “ODFHello” shared library"
  246.     " should be placed in the Editors folder.  To create a new document, "
  247.     "open a stationery pad."
  248. };
  249.  
  250. //-------------------------------------------------------------------------------------
  251. // Other resources
  252. //-------------------------------------------------------------------------------------
  253.  
  254. include "MacIcons.rsrc" not 'ckid';
  255.  
  256.